// components/User_Posts/User_Posts.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    com_url:{
      type:String,
      value:""
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    islike:0,
    like:18,
    comment:7,
    src_xihuan:"../../pages/icon/xihuan01.png"

  },
 




  /**
   * 组件的方法列表
   */
  methods: {
    likeNum(){
  
      if(this.data.islike % 2 == 0){
        var src_xihuan = "../../pages/icon/aixin.png"
        this.setData({
          like : this.data.like+ 1,
          islike :1,
          src_xihuan:src_xihuan
        })
      }
      else{
        var src_xihuan = "../../pages/icon/xihuan01.png"
        this.setData({
          like : this.data.like- 1,
          islike:0,
          src_xihuan:src_xihuan
        })
      }
      
    },
  
    commentNum(){
      console.log("评论数")
    }
  }
})
